package cn.siat.system.api;

import cn.siat.common.core.constant.SecurityConstants;
import cn.siat.common.core.constant.ServiceNameConstants;
import cn.siat.common.core.domain.R;
import cn.siat.system.api.domain.SysUser;
import cn.siat.system.api.factory.RemoteUserFallbackFactory;
import cn.siat.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * python相关服务
 * 
 * @author siat
 */
@FeignClient(contextId = "remoteAlgorithmService",url = "${url.algorithm-service}", value = ServiceNameConstants.ALGORITHM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteAlgorithmService
{
    /**
     * 元件解析
     * @param param {"sourceFile": ""}
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/fileManager/sequecen/vc")
    Map<String,Object> analysis(@RequestBody Map<String,Object> param, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    /**
     * 元件优化
     * @param param {"chiselRule":[{"start":1,"end":1319,"strand":1,"annotation":""}],"content":""}
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/sequecen/optimization")
    Map<String,Object>  optimization(@RequestBody Map<String,Object> param, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 热图
     * @param param {
     * "ovhSize":"4", -- 第一个文本框的 对应的数值
     * "condition":"T4, 25°C, 1h (Potapov et al., 2018)",  -- 页面上的condition
     * "size":"5",   -- size 需要计算 -
     * "maxgc":"50",  --
     * "maxat":"50"  --
     * }
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/ggo/opt")
    Map<String,Object>  ggo(@RequestBody Map<String,Object> param, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
